Optimal. Leaf size=476 \[ -\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 d e \left (a^2+b^2\right )^2 (a+b \cot (c+d x))}-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a d e \left (a^2+b^2\right ) (a+b \cot (c+d x))^2}+\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3}-\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3}-\frac{b^{3/2} \left (6 a^2 b^2+35 a^4+3 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{e \cot (c+d x)}}{\sqrt{a} \sqrt{e}}\right )}{4 a^{5/2} d \sqrt{e} \left (a^2+b^2\right )^3}+\frac{(a+b) \left (a^2-4 a b+b^2\right ) \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3}-\frac{(a+b) \left (a^2-4 a b+b^2\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}+1\right )}{\sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.24206, antiderivative size = 476, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 13, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.52, Rules used = {3569, 3649, 3653, 3534, 1168, 1162, 617, 204, 1165, 628, 3634, 63, 205} \[ -\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 d e \left (a^2+b^2\right )^2 (a+b \cot (c+d x))}-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a d e \left (a^2+b^2\right ) (a+b \cot (c+d x))^2}+\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3}-\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}+\sqrt{e}\right )}{2 \sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3}-\frac{b^{3/2} \left (6 a^2 b^2+35 a^4+3 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{e \cot (c+d x)}}{\sqrt{a} \sqrt{e}}\right )}{4 a^{5/2} d \sqrt{e} \left (a^2+b^2\right )^3}+\frac{(a+b) \left (a^2-4 a b+b^2\right ) \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3}-\frac{(a+b) \left (a^2-4 a b+b^2\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}+1\right )}{\sqrt{2} d \sqrt{e} \left (a^2+b^2\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3569
Rule 3649
Rule 3653
Rule 3534
Rule 1168
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rule 3634
Rule 63
Rule 205
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{e \cot (c+d x)} (a+b \cot (c+d x))^3} \, dx &=-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{\int \frac{-\frac{1}{2} \left (4 a^2+3 b^2\right ) e+2 a b e \cot (c+d x)-\frac{3}{2} b^2 e \cot ^2(c+d x)}{\sqrt{e \cot (c+d x)} (a+b \cot (c+d x))^2} \, dx}{2 a \left (a^2+b^2\right ) e}\\ &=-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}+\frac{\int \frac{\frac{1}{4} \left (8 a^4+3 a^2 b^2+3 b^4\right ) e^2-4 a^3 b e^2 \cot (c+d x)+\frac{1}{4} b^2 \left (11 a^2+3 b^2\right ) e^2 \cot ^2(c+d x)}{\sqrt{e \cot (c+d x)} (a+b \cot (c+d x))} \, dx}{2 a^2 \left (a^2+b^2\right )^2 e^2}\\ &=-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}+\frac{\left (b^2 \left (35 a^4+6 a^2 b^2+3 b^4\right )\right ) \int \frac{1+\cot ^2(c+d x)}{\sqrt{e \cot (c+d x)} (a+b \cot (c+d x))} \, dx}{8 a^2 \left (a^2+b^2\right )^3}+\frac{\int \frac{2 a^3 \left (a^2-3 b^2\right ) e^2-2 a^2 b \left (3 a^2-b^2\right ) e^2 \cot (c+d x)}{\sqrt{e \cot (c+d x)}} \, dx}{2 a^2 \left (a^2+b^2\right )^3 e^2}\\ &=-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}+\frac{\left (b^2 \left (35 a^4+6 a^2 b^2+3 b^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{-e x} (a-b x)} \, dx,x,-\cot (c+d x)\right )}{8 a^2 \left (a^2+b^2\right )^3 d}+\frac{\operatorname{Subst}\left (\int \frac{-2 a^3 \left (a^2-3 b^2\right ) e^3+2 a^2 b \left (3 a^2-b^2\right ) e^2 x^2}{e^2+x^4} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{a^2 \left (a^2+b^2\right )^3 d e^2}\\ &=-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}-\frac{\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{e+x^2}{e^2+x^4} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{\left (a^2+b^2\right )^3 d}-\frac{\left ((a-b) \left (a^2+4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{e-x^2}{e^2+x^4} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{\left (a^2+b^2\right )^3 d}-\frac{\left (b^2 \left (35 a^4+6 a^2 b^2+3 b^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+\frac{b x^2}{e}} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{4 a^2 \left (a^2+b^2\right )^3 d e}\\ &=-\frac{b^{3/2} \left (35 a^4+6 a^2 b^2+3 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{e \cot (c+d x)}}{\sqrt{a} \sqrt{e}}\right )}{4 a^{5/2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}-\frac{\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{e-\sqrt{2} \sqrt{e} x+x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 \left (a^2+b^2\right )^3 d}-\frac{\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{e+\sqrt{2} \sqrt{e} x+x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 \left (a^2+b^2\right )^3 d}+\frac{\left ((a-b) \left (a^2+4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{\sqrt{2} \sqrt{e}+2 x}{-e-\sqrt{2} \sqrt{e} x-x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}+\frac{\left ((a-b) \left (a^2+4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{\sqrt{2} \sqrt{e}-2 x}{-e+\sqrt{2} \sqrt{e} x-x^2} \, dx,x,\sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}\\ &=-\frac{b^{3/2} \left (35 a^4+6 a^2 b^2+3 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{e \cot (c+d x)}}{\sqrt{a} \sqrt{e}}\right )}{4 a^{5/2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}+\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}+\frac{\left ((a+b) \left (a^2-4 a b+b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}\\ &=-\frac{b^{3/2} \left (35 a^4+6 a^2 b^2+3 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{e \cot (c+d x)}}{\sqrt{a} \sqrt{e}}\right )}{4 a^{5/2} \left (a^2+b^2\right )^3 d \sqrt{e}}+\frac{(a+b) \left (a^2-4 a b+b^2\right ) \tan ^{-1}\left (1-\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{(a+b) \left (a^2-4 a b+b^2\right ) \tan ^{-1}\left (1+\frac{\sqrt{2} \sqrt{e \cot (c+d x)}}{\sqrt{e}}\right )}{\sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{b^2 \sqrt{e \cot (c+d x)}}{2 a \left (a^2+b^2\right ) d e (a+b \cot (c+d x))^2}-\frac{b^2 \left (11 a^2+3 b^2\right ) \sqrt{e \cot (c+d x)}}{4 a^2 \left (a^2+b^2\right )^2 d e (a+b \cot (c+d x))}+\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)-\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}-\frac{(a-b) \left (a^2+4 a b+b^2\right ) \log \left (\sqrt{e}+\sqrt{e} \cot (c+d x)+\sqrt{2} \sqrt{e \cot (c+d x)}\right )}{2 \sqrt{2} \left (a^2+b^2\right )^3 d \sqrt{e}}\\ \end{align*}
Mathematica [C] time = 6.12077, size = 411, normalized size = 0.86 \[ -\frac{\sqrt{\cot (c+d x)} \left (-\frac{2 b \left (3 a^2-b^2\right ) \cot ^{\frac{3}{2}}(c+d x) \text{Hypergeometric2F1}\left (\frac{3}{4},1,\frac{7}{4},-\cot ^2(c+d x)\right )}{3 \left (a^2+b^2\right )^3}+\frac{2 b^2 \sqrt{\cot (c+d x)} \text{Hypergeometric2F1}\left (\frac{1}{2},3,\frac{3}{2},-\frac{b \cot (c+d x)}{a}\right )}{a^3 \left (a^2+b^2\right )}+\frac{2 b^2 \sqrt{\cot (c+d x)} \left (\frac{a}{a+b \cot (c+d x)}+\frac{\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\cot (c+d x)}}{\sqrt{a}}\right )}{\sqrt{b} \sqrt{\cot (c+d x)}}\right )}{a \left (a^2+b^2\right )^2}+\frac{2 b^{3/2} \left (3 a^2-b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{\cot (c+d x)}}{\sqrt{a}}\right )}{\sqrt{a} \left (a^2+b^2\right )^3}-\frac{a \left (a^2-3 b^2\right ) \left (2 \sqrt{2} \log \left (\cot (c+d x)-\sqrt{2} \sqrt{\cot (c+d x)}+1\right )-2 \sqrt{2} \log \left (\cot (c+d x)+\sqrt{2} \sqrt{\cot (c+d x)}+1\right )+4 \left (\sqrt{2} \tan ^{-1}\left (1-\sqrt{2} \sqrt{\cot (c+d x)}\right )-\sqrt{2} \tan ^{-1}\left (\sqrt{2} \sqrt{\cot (c+d x)}+1\right )\right )\right )}{8 \left (a^2+b^2\right )^3}\right )}{d \sqrt{e \cot (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.057, size = 1190, normalized size = 2.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{e \cot{\left (c + d x \right )}} \left (a + b \cot{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (b \cot \left (d x + c\right ) + a\right )}^{3} \sqrt{e \cot \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]